{
LANG : PASCAL
PROB : money
}

program MONEY;
const
  fi = 'money.in';
  fo = 'money.out';
  maxc = 10000;
var
  d : array[0..1, 0..maxc] of int64;
  c : array[1..25] of longint;
  m, n : longint;
  tren, duoi : byte;

procedure inp;
var
  i : integer;
begin
  read(m, n);
  for i := 1 to m do read(c[i]);
end;

procedure sort;
var
  i, j : integer;
  temp : longint;
begin
  for i := 1 to m do
    for j := i+1 to m do
      if c[i] > c[j] then
      begin
        temp := c[i];
        c[i] := c[j];
        c[j] := temp;
      end;
end;

procedure process;
var
  i, j, k : longint;
begin
  tren := 0;
  duoi := 1;
  d[0, 0] := 1;
  for i := 1 to m do
  begin
    fillchar(d[duoi], sizeof(d[duoi]), 0);
    for j := 0 to n do
    begin
      d[duoi, j] := d[tren, j];
      if j-c[i] >= 0 then inc(d[duoi, j], d[duoi, j-c[i]]);
    end;
    tren := duoi;
    duoi := duoi xor 1;
  end;
end;

procedure out;
begin
  writeln(d[tren, n]);
end;

begin
  assign(input, fi); reset(input);
  assign(output, fo); rewrite(output);
  inp;
  sort;
  process;
  out;
  close(output);
  close(input);
end.